import datetime
def ascii_to_datetime(ascii_str):
    #http://www.tianya.cn/techforum/content/16/619502.shtml
    #floor 1095,only date,without time
    date_str=ascii_str
    if len(date_str) >12:
        return datetime.datetime.strptime(ascii_str,'%Y-%m-%d %H:%M:%S')
    else:
        return datetime.datetime.strptime(ascii_str,'%Y-%m-%d')

#t=ascii_to_datetime("2009-12-24 12:32:12")
#str_t=str(t)
#print str_t
#datetime.datetime.strptime(str_t,'%Y-%m-%d %H:%M:%S')

import xmlrpclib
from xmw import error
s = xmlrpclib.Server('http://localhost:8000/xmlrpc/thread_mgr')

#print s.app.getName()
#print s.thead_mgr.reg_url('http://bbs.city.tianya.cn/tianyacity/Content/45/1/1089006.shtml')
#print s.thead_mgr.echo('http://bbs.city.tianya.cn/tianyacity/Content/45/1/1089006.shtml')
(ret,e_dict)=s.thead_mgr.reg_url('http://bbs.city.tianya.cn/tianyacity/Contentq/45/1/1089006.shtml')
print type(ret)
print error.Error.build_error(e_dict)
"""
print type(t)
print dir(t)
#print s.app.echo("fdfd")
"""